<template>
  <el-tabs v-model="activeName">
    <el-tab-pane label="终端信息" name="first">
      <FormPanel ref="formPanel" :list="formList" :labelPosition="'top'" :formType="type" @formChange="changeHandle" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
      <FormPanel ref="formPanel1" :list="formList1" :labelPosition="'top'" :formType="type" @formChange="changeHandle1" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
      <FormPanel ref="formPanel2" :list="formList2" :labelPosition="'top'" :formType="type" @formChange="changeHandle2" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
      <FilterTable ref="table" :columns="columns" :dataSource="tableList" :isSelectColumn="false" :isPagination="false" :isColumnFilter="false" :isToperInfo="false" height="auto" :onColumnsChange="(columns) => (this.columns = columns)"></FilterTable>
      <FormPanel ref="formPanel3" :list="formList3" :labelPosition="'top'" :formType="type" @formChange="changeHandle3" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
      <FormPanel ref="formPanel4" :list="formList4" :labelPosition="'top'" :formType="type" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
    </el-tab-pane>
    <!-- <el-tab-pane label="电池租赁" name="second">
      <FormPanel ref="formPanel5" :list="formList5" :formType="type" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
    </el-tab-pane> -->
    <div style="height: 47px"></div>
    <div
      :style="{
        position: 'absolute',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 9,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'center',
      }"
    >
      <el-button type="primary" v-if="type === 'edit'" @click="updateAudit(1)">审核通过</el-button>
      <el-button type="primary" v-if="type === 'edit'" @click="updateAudit(2)">审核驳回</el-button>
      <el-button @click="closeDrawer">关 闭</el-button>
    </div>
  </el-tabs>
</template>
<script>
import { dictionary } from '@/utils/dictMixin';
import { getInfoById, audit } from '@/api/omSale/ActualSales/SalesQuery';

export default {
  mixins: [dictionary],
  props: ['type', 'rowData'],

  data() {
    this.saveData = null;
    this.saveData1 = null;
    this.saveData2 = null;
    this.saveData3 = null;
    this.saveData4 = null;
    return {
      formList: this.createdFrom(),
      formList1: this.createdFrom1(),
      formList2: this.createdFrom2(),
      formList3: this.createdFrom3(),
      formList4: this.createdFrom4(),
      formList5: this.createdFrom5(),
      columns: this.createdTable(),
      dataSource: [],
      tableList: [],
      isCan: false,
      isExamine: false,
      empList: [],
      carInfo: {},
      customerInfo: {},
      salesReportInfo: {},
      activeName: 'first',
    };
  },
  created() {
    this.formList.forEach((item) => {
      item.disabled = true;
    });
    this.formList1.forEach((item) => {
      item.disabled = true;
    });
    this.formList2.forEach((item) => {
      item.disabled = true;
    });
    this.formList3.forEach((item) => {
      item.disabled = true;
    });
    if (this.type !== 'edit') {
      this.formList4.forEach((item) => {
        item.disabled = true;
      });
    }
  },
  mounted() {
    this.init();

      if (this.type !== 'edit') {
        this.formList.forEach((item) => {
          item.rules = [];
        });
        this.formList1.forEach((item) => {
          item.rules = [];
        });
        this.formList2.forEach((item) => {
          item.rules = [];
        });
        this.formList3.forEach((item) => {
          item.rules = [];
        });
      }

  },
  methods: {
    init() {
      if (this.type != 'add') {
        this.getDetail();
      }
    },

    async updateAudit(val) {
      let statusParams = {
        actualSalesId: this.rowData.actualSalesId,
        status: val,
        solidType: this.rowData.solidType,
      };
      const data = { ...this.$refs.formPanel4.SUBMIT_FORM() };
      // console.log(data.auditOpinion);
      let errStatus = null;
      if (val === 2 && (!data || !data.approvalComments)) {
        this.isExamine = true;
        this.formList4 = this.createdFrom4();
        console.log(this.formList4);
        this.saveData4.approvalComments = data.approvalComments;
        let [err, data4] = await this.$refs.formPanel4.GET_FORM_DATA();
        console.log(err);
        errStatus = err;
      }
      statusParams.approvalComments = data.approvalComments;
      if (val === 2 && errStatus) return;
      console.log(val === 2, errStatus, val === 2 && errStatus);
      const res = await audit(statusParams);
      this.closeDrawer();
    },
    // 详细
    async getDetail() {
      const res = await getInfoById(this.rowData.actualSalesId, this.rowData.solidType);
      if (res.resultCode == 200) {
        this.tableList = res.data.ttSoRightsInterestsPos;
        for (let i in res.data) {
          this.formList.map((x) => {
            if (x.fieldName == i && res.data[i]) {
              x.initialValue = res.data[i];
              if (x.fieldName === 'powerType') {
                this.selectPowerType(res.data[i]);
              }
            }
          });
          this.formList1.map((x) => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
              if (x.fieldName === 'customerType') {
                this.selectCustomer(res.data[i]);
              }
              if (x.fieldName === 'isVip') {
                this.isSelectVip(res.data[i]);
              }
            }
          });
          this.formList2.map((x) => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
              if (x.fieldName === 'isRebate') {
                this.isSelectRebate(res.data[i]);
              }
              // if (x.fieldName === 'isReplace') {
              //   this.isSelectReplace(res.data[i]);
              // }
            }
          });
          this.formList3.map((x) => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
            }
          });
          this.formList4.map((x) => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
            }
          });
          this.formList5.map((x) => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
            }
          });
        }
      }
    },
    changeHandle(val) {
      this.saveData = val;
    },
    changeHandle1(val) {
      this.saveData1 = val;
    },
    changeHandle2(val) {
      this.saveData2 = val;
    },
    changeHandle3(val) {
      this.saveData3 = val;
    },
    closeDrawer(type) {
      this.$emit('close', false, type);
    },
    // 客户类型选择
    selectCustomer(val) {
      // 公司
      console.log(val);
      if (val === 21171002) {
        this.formList1.forEach((item) => {
          // item.hidden?!item.hidden:item.hidden
          if (item.hidden && item.fieldName !== 'bigCustomerFiles') {
            item.hidden = false;
          }
        });
        this.formList1.find((x) => x.fieldName == 'sex').rules = [];
        this.formList1.find((x) => x.fieldName == 'idTypeCode').rules = [];
        this.formList1.find((x) => x.fieldName == 'idNumber').rules = [];
        this.formList1.find((x) => x.fieldName == 'identityCardFront').rules = [];
        this.formList1.find((x) => x.fieldName == 'identityCardReverse').rules = [];
        this.formList1.find((x) => x.fieldName == 'sex').disabled = true;
        this.formList1.find((x) => x.fieldName == 'idTypeCode').disabled = true;
        this.formList1.find((x) => x.fieldName == 'idNumber').disabled = true;
        if (this.type === 'edit') {
          this.formList1.find((x) => x.fieldName == 'soNo').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList1.find((x) => x.fieldName == 'customerType').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList1.find((x) => x.fieldName == 'legalIdentityCardFront').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList1.find((x) => x.fieldName == 'legalIdentityCardReverse').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList1.find((x) => x.fieldName == 'businessLicense').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList1.find((x) => x.fieldName == 'adminAuthorizationFiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList1.find((x) => x.fieldName == 'unitContactPersonCardFront').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList1.find((x) => x.fieldName == 'unitContactPersonCardReverse').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'consultantName').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'orderAllAmount').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'handoverCarTime').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'proceduralContract').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'holdIdentityCard').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'isSpecialOrder').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'isThreeGuarantees').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'buildChargingPiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          // this.formList2.find((x) => x.fieldName == 'commercialInsuranceFiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          // this.formList2.find((x) => x.fieldName == 'trafficlInsuranceFiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        }

        this.formList1.find((x) => x.fieldName == 'isVip').rules = [];

        // this.formList1.find(x => x.fieldName == 'identityCardReverse').disabled = false;
        // 公司只能选择 统一社会信用代码和组织机构代码
        const itemList = this.formList1.find((x) => x.fieldName == 'idTypeCode').itemList;
        this.formList1.find((x) => x.fieldName == 'idTypeCode').itemList = itemList.filter((item) => item.value == 21201008 || item.value == 21201007);
      } else {
        this.formList1.find((x) => x.fieldName == 'companyName').hidden = true;
        this.formList1.find((x) => x.fieldName == 'adminAuthorizationFiles').hidden = true;
        this.formList1.find((x) => x.fieldName == 'unitContactPersonCardFront').hidden = true;
        this.formList1.find((x) => x.fieldName == 'unitContactPersonCardReverse').hidden = true;
        this.formList1.find((x) => x.fieldName == 'unitContactPersonId').hidden = true;
        this.formList1.find((x) => x.fieldName == 'lagalPersonId').hidden = true;
        this.formList1.find((x) => x.fieldName == 'lagalPersonName').hidden = true;
        this.formList1.find((x) => x.fieldName == 'fax').hidden = true;
        this.formList1.find((x) => x.fieldName == 'lagalPersonMobile').hidden = true;
        this.formList1.find((x) => x.fieldName == 'legalIdentityCardFront').hidden = true;
        this.formList1.find((x) => x.fieldName == 'legalIdentityCardReverse').hidden = true;
        this.formList1.find((x) => x.fieldName == 'businessLicense').hidden = true;
        this.formList1.find((x) => x.fieldName == 'institutionCode').hidden = true;
        this.formList1.find((x) => x.fieldName == 'unitContactMobile').hidden = true;
        this.formList1.find((x) => x.fieldName == 'unitContactor').hidden = true;
        if (this.type === 'edit') {
          let arr = [{ required: true, message: '请上传', trigger: 'change' }];
        this.formList2.find((x) => x.fieldName == 'proceduralContract').rules = arr;
        this.formList2.find((x) => x.fieldName == 'holdIdentityCard').rules = arr;
          this.formList1.find((x) => x.fieldName == 'sex').rules = [{ required: true, message: '请选择性别', trigger: 'change' }];
        this.formList1.find((x) => x.fieldName == 'idTypeCode').rules = [{ required: true, message: '请选择', trigger: 'change' }];
        if (this.formList1.find((x) => x.fieldName == 'idTypeCode').initialValue == 21201001) {
          this.formList1.find((x) => x.fieldName == 'idNumber').rules = [
            { required: true, message: '请输入', trigger: 'blur' },
            { required: true, message: '请输入正确的身份证号', validator: IDNumber, trigger: 'blur' },
          ];
        } else {
          this.formList1.find((x) => x.fieldName == 'idNumber').rules = [{ required: true, message: '请输入', trigger: 'change' }];
        }
        this.formList1.find((x) => x.fieldName == 'identityCardFront').rules = [{ required: false, message: '请上传', trigger: 'change' }];
        this.formList1.find((x) => x.fieldName == 'identityCardReverse').rules = [{ required: false, message: '请选择.', trigger: 'change' }];
          this.formList1.find((x) => x.fieldName == 'soNo').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList1.find((x) => x.fieldName == 'customerType').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'consultantName').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'orderAllAmount').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'handoverCarTime').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'isSpecialOrder').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'isThreeGuarantees').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
          this.formList2.find((x) => x.fieldName == 'buildChargingPiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        }
        // if (!this.isDetailed) {
        //   this.formList1.forEach(x => {
        //     if (
        //       x.fieldName == 'birthday' ||
        //       x.fieldName == 'ageStage' ||
        //       x.fieldName == 'wechatNo' ||
        //       x.fieldName == 'identityCardFront' ||
        //       x.fieldName == 'identityCardReverse' ||
        //       x.fieldName == 'occupationType' ||
        //       x.fieldName == 'educationLevel' ||
        //       x.fieldName == 'householdType' ||
        //       x.fieldName == 'unitNature' ||
        //       x.fieldName == 'industryType' ||
        //       x.fieldName == 'maritalStatus' ||
        //       x.fieldName == 'annualHouseholdIncome' ||
        //       x.fieldName == 'hobby' ||
        //       x.fieldName == 'favoriteContactType' ||
        //       x.fieldName == 'convenientTime'
        //     ) {
        //       x.disabled = false;
        //     }
        //   });
        // }
        // this.formList1.find(x => x.fieldName == 'sex').hidden = true;

        //  个人不允许选择统一社会信用编码和机构代码
        const itemList = this.formList1.find((x) => x.fieldName == 'idTypeCode').itemList;
        this.formList1.find((x) => x.fieldName == 'idTypeCode').itemList = itemList.filter((item) => !(item.value == 21201007 || item.value == 21201008));
        // let arr = [];

      }
    },
    // 是否是大客户
    isSelectVip(val) {
      if (val == 10041001) {
        this.formList1.find((x) => x.fieldName == 'bigCustomerFiles').hidden = false;
      } else {
        this.formList1.find((x) => x.fieldName == 'bigCustomerFiles').hidden = true;
      }
    },
    // 是否是燃油车
    selectPowerType(val) {
      let arr = [];
      let notArr = [{ required: true, message: '请上传', trigger: 'change' }];
      if (val == 50081001) {
        arr = [{ required: false, message: '请上传', trigger: 'change' }];
        notArr = [];
      }
      // // 燃油车必传
      // this.formList2.find(x => x.fieldName == 'holdIdentityCard').rules = arr;
      // this.formList2.find(x => x.fieldName == 'proceduralContract').rules = arr;
      // // 电车必传
      // if (this.type == 'edit') {
      //   this.formList2.find((x) => x.fieldName == 'isBatteryRental').rules = notArr;
      //   this.formList2.find((x) => x.fieldName == 'commercialInsuranceFiles').rules = notArr;
      //   this.formList2.find((x) => x.fieldName == 'trafficlInsuranceFiles').rules = notArr;
      // }
    },

    isSelectRebate(val) {
      let arr = [];
      if (val == 10041001) {
        arr = [{ required: true, message: '请上传', trigger: 'change' }];
      }
      // if (this.type == 'edit') {
      //   this.formList2.find(x => x.fieldName == 'rebateFiles').rules = arr;
      // }
      // console.log('返利' + val);
      // console.log(this.formList2.find(x => x.fieldName == 'rebateFiles'));
    },
    isSelectReplace(val) {
      let arr = [];
      if (val == 10041001) {
        arr = [{ required: true, message: '请上传', trigger: 'change' }];
      }
      if (this.type == 'edit') {
        this.formList2.find((x) => x.fieldName == 'replaceFiles').rules = arr;
      }
      console.log('换购' + val);
      console.log(this.formList2.find((x) => x.fieldName == 'replaceFiles'));
    },
    showItems1(type) {
      this.formList1.find((x) => x.fieldName == 'customerType').initialValue = type;
      if (type == 15231003) {
        this.formList1.find((x) => x.fieldName == 'companyLinkMan').hidden = false;
        this.formList1.find((x) => x.fieldName == 'companyLinkPhone').hidden = false;
        this.formList1.find((x) => x.fieldName == 'corpName').hidden = false;
        this.formList1.find((x) => x.fieldName == 'corpMobile').hidden = false;
        this.formList1.find((x) => x.fieldName == 'fax').hidden = false;
        return;
      }
      this.formList1.find((x) => x.fieldName == 'companyLinkMan').hidden = true;
      this.formList1.find((x) => x.fieldName == 'companyLinkPhone').hidden = true;
      this.formList1.find((x) => x.fieldName == 'corpName').hidden = true;
      this.formList1.find((x) => x.fieldName == 'corpMobile').hidden = true;
      this.formList1.find((x) => x.fieldName == 'fax').hidden = true;
    },
    showItems2(type) {
      this.formList2.find((x) => x.fieldName == 'payType').initialValue = type;
      if (type == 60151001) {
        this.formList2.find((x) => x.fieldName == 'financialInstitution').hidden = false;
        this.formList2.find((x) => x.fieldName == 'periodsNumber').hidden = false;
        return;
      }
      this.formList2.find((x) => x.fieldName == 'financialInstitution').hidden = true;
      this.formList2.find((x) => x.fieldName == 'periodsNumber').hidden = true;
    },
    // 翻译省市区
    transDictText(val, dirtArr) {
      console.log(dirtArr, '---翻译---');
      let res = '';
      if (!val) return res;
      if (Array.isArray(dirtArr)) {
        const target = dirtArr.find((x) => x.value == val);
        res = target ? target.text || '' : val;
      }
      return res;
    },
    // ---------------------------车辆信息---------------------------
    createdFrom() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '车辆信息',
        },
        {
          type: 'INPUT',
          label: '品牌',
          fieldName: 'brandName',
          initialValue: '',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '车系',
          fieldName: 'seriesName',
          initialValue: '',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '车型',
          fieldName: 'modelName',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '配置',
          fieldName: 'configName',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '年款',
          fieldName: 'yearModel',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '选装',
          fieldName: 'optionName',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '内饰',
          fieldName: 'trimName',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '外饰',
          fieldName: 'colorName',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '物料编码',
          fieldName: 'productCode',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '物料描述',
          fieldName: 'productName',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'SELECT',
          label: '动力类型',
          fieldName: 'powerType',
          disabled: true,
          placeholder: '',
          itemList: this.createDictList('5008'),
        },
        {
          type: 'INPUT',
          label: '销售指导价',
          fieldName: 'directivePrice',
          placeholder: '',
          disabled: true,
          numberFormat: true,
          // precision: 2
        },
        {
          type: 'INPUT',
          label: 'VIN',
          fieldName: 'vin',
          initialValue: '',
          disabled: !this.isAdd,
          readonly: true,
          placeholder: '请输入VIN...',
          rules: [{ required: true, message: '请输入VIN...', trigger: 'blur' }],
          unitRender: (p) => {
            return (
              <div>
                <multiuse-button icon="el-icon-search" onClick={() => this.selectVin()} />
              </div>
            );
          },
        },
        {
          type: 'INPUT',
          label: '发动机号',
          fieldName: 'engineNo',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '电机号',
          fieldName: 'eleEngineNo',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '合格证号',
          fieldName: 'certificateNumber',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '电池号',
          fieldName: 'batteryNo',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'DATE',
          label: '终端配车日期',
          maxDateTime: new Date(),
          fieldName: 'dispatchedData',
          dateType: 'exactdate',
          format: 'yyyy-MM-dd HH:mm:ss',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '公告号',
          fieldName: 'announcementNo',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '经销商简称',
          fieldName: 'dealerName',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'DATE',
          label: '终端出库日期',
          maxDateTime: new Date(),
          fieldName: 'latestStockOutDate',
          dateType: 'exactdate',
          format: 'yyyy-MM-dd HH:mm:ss',
          placeholder: '',
          disabled: true,
        },
      ];
    },
    // ----------------------------客户信息--------------------------
    createdFrom1() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '客户信息',
        },
        {
          type: 'INPUT',
          label: '零售单号',
          fieldName: 'soNo',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '客户编号',
          fieldName: 'potentialCustomerNo',
          placeholder: '',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '客户姓名',
          fieldName: 'customerName',
          maxlength: 36,
          rules: [],
          placeholder: '',
        },
        {
          type: 'SELECT',
          label: '客户类型',
          fieldName: 'customerType',
          placeholder: '',
          disabled: true,
          itemList: this.createDictList('2117') || [],
        },
        {
          type: 'SELECT',
          label: '性别',
          fieldName: 'sex',
          placeholder: '',
          rules: [{ required: true, message: '请选择', trigger: 'change' }],
          itemList: this.createDictList('1002') || [],
        },
        {
          type: 'SELECT',
          label: '证件类型',
          fieldName: 'idTypeCode',
          rules: [{ required: true, message: '请选择', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2120') || [],
        },
        {
          type: 'INPUT',
          label: '证件号',
          fieldName: 'idNumber',
          rules: [],
          placeholder: '',
          maxlength: 36,
        },
        {
          type: 'DATE',
          label: '出生日期',
          maxDateTime: new Date(),
          fieldName: 'birthday',
          dateType: 'exactdate',
          placeholder: '',
        },
        {
          type: 'SELECT',
          label: '年龄段',
          fieldName: 'ageStage',
          placeholder: '',
          itemList: this.createDictList('2118') || [],
        },
        {
          type: 'INPUT',
          label: '手机号',
          fieldName: 'customerMobile',
          disabled: true,
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '电话',
          maxlength: 36,
          fieldName: 'customerPhone',
          rules: [],
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '微信号',
          maxlength: 36,
          rules: [],
          fieldName: 'wechatNo',
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '联系地址',
          rules: [{ required: true, message: '请输入', trigger: 'change' }],
          maxlength: 36,
          fieldName: 'address',
          placeholder: '',
        },
        {
          type: 'SELECT',
          label: '省份',
          rules: [{ required: true, message: '请选择', trigger: 'change' }],
          fieldName: 'provinceName',
          initialValue: '',
          style: { width: '150px' },
          itemList: [],
        },
        {
          type: 'SELECT',
          label: '城市',
          rules: [{ required: true, message: '请选择', trigger: 'change' }],
          fieldName: 'cityName',
          style: { width: '150px' },
          initialValue: '',
          itemList: [],
        },
        {
          type: 'SELECT',
          label: '县区',
          // rules: [{ required: true, message: '请选择', trigger: 'change' }],
          fieldName: 'districtName',
          style: { width: '150px' },
          placeholder: '',
          initialValue: '',
          itemList: [],
        },
        {
          type: 'INPUT',
          label: '统一社会信用代码',
          maxlength: 36,
          fieldName: 'institutionCode',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '运营单位联系人',
          maxlength: 36,
          fieldName: 'unitContactor',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '运营单位联系电话',
          maxlength: 36,
          fieldName: 'unitContactMobile',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: '',
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '企业',
          fieldName: 'companyName',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: '',
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '授权人身份证号',
          fieldName: 'unitContactPersonId',
          rules: [
            { required: true, message: '请输入', trigger: 'blur' },
            { required: true, message: '请输入正确的身份证号', trigger: 'blur' },
          ],
          placeholder: '',
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '法人身份证号',
          fieldName: 'lagalPersonId',
          rules: [
            { required: true, message: '请输入', trigger: 'blur' },
            { required: true, message: '请输入正确的身份证号', trigger: 'blur' },
          ],
          placeholder: '',
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '法人代表姓名',
          rules: [],
          fieldName: 'lagalPersonName',
          placeholder: '',
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '法人代表手机',
          rules: [],
          fieldName: 'lagalPersonMobile',
          placeholder: '',
        },

        {
          type: 'INPUT',
          maxlength: 36,
          label: '传真',
          // rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          fieldName: 'fax',
          placeholder: '',
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '邮编',
          fieldName: 'zipCode',
          placeholder: '',
        },
        {
          type: 'SELECT',
          label: '是否大客户',
          fieldName: 'isVip',
          placeholder: '',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          itemList: this.createDictList('1004') || [],
        },
        {
          type: 'INPUT',
          label: '使用人',
          maxlength: 36,
          rules: [{ required: true, message: '请输入', trigger: 'change' }],
          fieldName: 'user',
          placeholder: '',
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '使用人电话',
          rules: [{ required: true, message: '请输入', trigger: 'change' }],
          fieldName: 'userMobile',
          placeholder: '',
        },
        {
          type: 'SELECT',
          label: '职业',
          fieldName: 'occupationType',
          placeholder: '',
          itemList: this.createDictList('2122') || [],
        },
        {
          type: 'SELECT',
          label: '学历',
          fieldName: 'educationLevel',
          placeholder: '',
          itemList: this.createDictList('1035') || [],
        },
        {
          type: 'SELECT',
          label: '户口类型',
          fieldName: 'householdType',
          placeholder: '',
          itemList: this.createDictList('2121') || [],
        },
        {
          type: 'SELECT',
          label: '单位性质',
          fieldName: 'unitNature',
          placeholder: '',
          itemList: this.createDictList('2123') || [],
        },
        {
          type: 'SELECT',
          label: '行业类型',
          fieldName: 'industryType',
          placeholder: '',
          itemList: this.createDictList('2124') || [],
        },
        // {
        //   type: 'SELECT',
        //   label: '客户级别',
        //   rules: [{ required: true, message: '请选择', trigger: 'change' }],
        //   fieldName: 'intentLevel',
        //   placeholder: '',
        //   itemList: this.createDictList('2430') || []
        // },
        {
          type: 'SELECT',
          label: '婚姻状况',
          fieldName: 'maritalStatus',
          placeholder: '',
          itemList: this.createDictList('2125') || [],
        },
        {
          type: 'SELECT',
          label: '家庭年收入',
          fieldName: 'annualHouseholdIncome',
          placeholder: '',
          itemList: this.createDictList('2126') || [],
        },
        {
          type: 'SELECT',
          label: '兴趣爱好',
          fieldName: 'hobby',
          placeholder: '',
          itemList: this.createDictList('2129') || [],
        },
        {
          type: 'SELECT',
          label: '习惯联系方式',
          fieldName: 'favoriteContactType',
          placeholder: '',
          itemList: this.createDictList('2131') || [],
        },
        {
          type: 'SELECT',
          label: '方便联系时段',
          fieldName: 'convenientTime',
          placeholder: '请选择',
          itemList: this.createDictList('2128') || [],
        },
        {
          type: 'UPLOAD_FILE',
          label: '身份证正面',
          fieldName: 'identityCardFront',
          selfCols: 2,
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '身份证反面',
          selfCols: 2,
          fieldName: 'identityCardReverse',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '法人身份证正面',
          selfCols: 2,
          fieldName: 'legalIdentityCardFront',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '法人身份证反面',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          fieldName: 'legalIdentityCardReverse',
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '营业执照',
          fieldName: 'businessLicense',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '管理员授权文件',
          fieldName: 'adminAuthorizationFiles',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '授权人身份证正面',
          fieldName: 'unitContactPersonCardFront',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '授权人身份证反面',
          fieldName: 'unitContactPersonCardReverse',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '大客户附件',
          fieldName: 'bigCustomerFiles',
          hidden: true,
          rules: [{ required: false, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
      ];
    },
    // ----------------------------销售信息--------------------------
    createdFrom2() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '销售信息',
        },
        {
          type: 'SELECT',
          label: '购车用途',
          fieldName: 'purchasePurpose',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2127') || [],
        },
        {
          type: 'INPUT',
          label: '销售顾问',
          disabled: true,
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          fieldName: 'consultantName',
          placeholder: '',
        },
        {
          type: 'INPUT_NUMBER',
          label: '购车价格',
          disabled: true,
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          fieldName: 'orderAllAmount',
          maxlength: 9,
          placeholder: '',
          numberFormat: true,
          precision: 0,
        },
        {
          type: 'DATE',
          label: '交车日期',
          disabled: true,
          maxDateTime: new Date(),
          dateType: 'exactdate',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          format: 'yyyy-MM-dd HH:mm:ss',
          fieldName: 'handoverCarTime',
          dateType: 'exactdate',
          placeholder: '',
        },
        {
          type: 'DATE',
          label: '订单创建日期',
          maxDateTime: new Date(),
          disabled: true,
          fieldName: 'snCreatedDate',
          dateType: 'exactdate',
          format: 'yyyy-MM-dd HH:mm:ss',
          placeholder: '',
        },
        {
          type: 'DATE',
          label: '终端开票日期',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          maxDateTime: new Date(),
          fieldName: 'drawTime',
          dateType: 'exactdate',
          format: 'yyyy-MM-dd',
          placeholder: '',
        },
        {
          type: 'INPUT_NUMBER',
          min: 0,
          label: '开票金额',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          fieldName: 'totalaMount',
          maxlength: 8,
          precision: 0,
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '发票号',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          fieldName: 'invoiceNo',
          placeholder: '',
        },
        {
          type: 'SELECT',
          label: '特殊订单',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          fieldName: 'isSpecialOrder',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
        },
        {
          type: 'SELECT',
          label: '是否三包',
          fieldName: 'isThreeGuarantees',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('1004') || [],
        },
        {
          type: 'SELECT',
          label: '是否异地购车',
          rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          fieldName: 'isAnotherPlace',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
        },
        // {
        //   type: 'CHECKBOX',
        //   label: '是否试乘试驾车',
        //   // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
        //   fieldName: 'isTestDriveCar',
        //   placeholder: '',
        //   initialValue: 10041001,
        //   options: {
        //     trueValue: 10041001,
        //     falseValue: 10041002,
        //   },
        //   itemList: this.createDictList('1004') || []
        // },
        {
          type: 'INPUT_NUMBER',
          min: 0,
          label: '交车里程',
          maxlength: 8,
          precision: 0,
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          fieldName: 'mileageUid',
          placeholder: '',
        },
        {
          type: 'INPUT_NUMBER',
          min: 0,
          label: '终身质保价格',
          fieldName: 'lifetimeWarrantyPrice',
          maxlength: 8,
          precision: 0,
          placeholder: ''
        },
        {
          type: 'SELECT',
          label: '是否终身质保',
          fieldName: 'isLifetimeWarranty',
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        {
          type: 'SELECT',
          label: '是否建设电桩',
          fieldName: 'buildChargingPiles',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
        },
        {
          type: 'SELECT',
          label: '是否申报补贴',
          fieldName: 'isApplySubsidies',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
        },
        {
          type: 'SELECT',
          label: '是否融资返利',
          fieldName: 'isRebate',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
          change: (val) => {
            this.isSelectRebate(val);
          },
        },
        {
          type: 'SELECT',
          label: '是否增换购',
          fieldName: 'isReplace',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
          change: (val) => {
            this.isSelectReplace(val);
          },
        },
        {
          type: 'SELECT',
          label: '是否销量冲刺',
          fieldName: 'isSalesSprint',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
        },
        {
          type: 'SELECT',
          label: '是否二次购买',
          fieldName: 'isBuyAgain',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
        },
        {
          type: 'SELECT',
          label: '是否电池租赁',
          // offsetRightCols: 2,
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          fieldName: 'isBatteryRental',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
        },
        // {
        //   type: 'INPUT',
        //   label: '开票单位',
        //   rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
        //   fieldName: 'invoiceUnit',
        //   placeholder: ''
        // },
{
          type: 'SELECT',
          label: '车辆用途',
          fieldName: 'vehicleUse',
          // rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2102') || [],
        },
        {
          type: 'SELECT',
          label: '是否分期',
          fieldName: 'typeOfPayment',
          // rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2156') || [],
        },
        {
          type: 'SELECT',
          label: '交车方式',
          fieldName: 'handoverCarMethod',
          // rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2155') || [],
        },
        {
          type: 'CHECKBOX',
          label: '是否试乘试驾车',
          // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          fieldName: 'isTestDriveCar',
          placeholder: '',
          initialValue: 10041001,
          options: {
            trueValue: 10041001,
            falseValue: 10041002,
          },
          itemList: this.createDictList('1004') || [],
        },
        {
          type: 'TEXT_AREA',
          label: '备注',
          offsetRightCols: 1,
          maxlength: 600,
          fieldName: 'remark',
          placeholder: '',
          selfCols: 3,
        },

        {
          type: 'UPLOAD_FILE',
          label: '发票附件',
          fieldName: 'invoiceUidList',
          selfCols: 2,
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '终端销售合同',
          selfCols: 2,
          fieldName: 'terminalSalesContract',
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '过程性合同',
          fieldName: 'proceduralContract',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '手持身份证照片',
          fieldName: 'holdIdentityCard',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '商业保险单',
          // disabled: true,
          fieldName: 'commercialInsuranceFiles',
          selfCols: 2,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '交强保险单',
          // disabled: true,
          fieldName: 'trafficlInsuranceFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '融资返利文件',
          // disabled: true,
          fieldName: 'rebateFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf'],
            limit: 2,
            // tipText: '最多上传1个附件'
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '增换购附件',
          // disabled: true,
          fieldName: 'replaceFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        // {
        //   type: 'UPLOAD_FILE',
        //   label: '交车单附件',
        //   // disabled: true,
        //   fieldName: 'orderDeliveryFile',
        //   selfCols: 2,
        //   rules: [],
        //   // selfCols: 3,
        //   upload: {
        //     actionUrl: '/api/file/oss/upload',
        //     fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
        //     limit: 1,
        //     tipText: '最多上传1个附件',
        //   },
        // },
        {
          type: 'UPLOAD_FILE',
          label: '交车单附件',
          // disabled: true,
          fieldName: 'andoverCarFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '其他附件',
          fieldName: 'attachmentUidsList',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'xls', 'pdf', 'xlsx', 'rar', 'zip'],
            limit: 10,
          },
        },
        {
          type: 'BREAK_SPACE',
          label: '权益列表',
        },
      ];
    },
    createdTable() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 80,
          sorter: true,
          fixed: 'left',
          render: (props) => {
            return <span>{props.row.index + 1}</span>;
          },
        },
        {
          title: '权益代码',
          dataIndex: 'rightsInterestsCode',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '权益名称',
          dataIndex: 'rightsInterestsName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '权益金额',
          dataIndex: 'rightsInterestsPrice',
          sorter: true,
          filter: true,
          filterType: 'input',
          numberFormat: true,
          precision: 2,
        },
      ];
    },
    // ----------------------------上牌信息--------------------------
    createdFrom3() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '上牌信息',
        },
        {
          type: 'INPUT',
          label: '车牌号',
          // rules: [{ required: true, message: '请输入正确的车牌号', trigger: 'blur' }],
          maxlength: 8,
          fieldName: 'licensePlateNumber',
          placeholder: '',
        },
        {
          type: 'DATE',
          label: '上牌日期',
          maxDateTime: new Date(),
          fieldName: 'licensePlateDate',
          dateType: 'exactdate',
          disabled: false,
          // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          placeholder: '',
        },
        {
          type: 'SELECT',
          label: '行驶证车辆性质',
          fieldName: 'licenseVehicleNature',
          // rules: [{ required: true, message: '请选择', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2114'),
        },
        // {
        //   type: 'SELECT',
        //   label: '订单类型',
        //   // offsetRightCols: 2,
        //   // rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
        //   fieldName: 'salesType',
        //   placeholder: '',
        //   itemList: this.createDictList('2137') || []
        // },
        {
          type: 'SELECT',
          label: '上牌省份',
          fieldName: 'licensePlateProvinceName',
          // rules: [{ required: true, message: '请选择', trigger: 'change' }],
          placeholder: '',
          // itemList: this.createRegionsList()
          itemList: [],
        },
        {
          type: 'SELECT',
          label: '上牌城市',
          // rules: [{ required: true, message: '请选择', trigger: 'change' }],
          fieldName: 'licensePlateCityName',
          placeholder: '',
          itemList: [],
        },
        {
          type: 'INPUT',
          label: '行驶证号',
          maxlength: 36,
          fieldName: 'vehicleLicenseNumber',
          // rules: [{ required: false, message: '请输入正确的行驶证号', trigger: 'blur' }],
          placeholder: '',
        },
        {
          type: 'DATE',
          label: '行驶证注册日期',
          maxDateTime: new Date(),
          fieldName: 'vehicleLicenseDate',
          disabled: false,
          // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          dateType: 'exactdate',
          placeholder: '',
        },
        {
          type: 'DATE',
          label: '行驶证发证日期',
          maxDateTime: new Date(),
          fieldName: 'vehicleLicenseIssueDate',
          // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          dateType: 'exactdate',
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '行驶证档案编号',
          fieldName: 'vehicleLicenseFileNo',
          // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          placeholder: '',
          disabled: false,
        },
        {
          type: 'INPUT',
          label: '行驶证住址',
          maxlength: 36,
          fieldName: 'vehicleLicenseAddress',
          // rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: '',
        },

        // {
        //   type: 'INPUT',
        //   label: '驾驶证号',
        //   maxlength: 36,
        //   rules: [{ min: 0, max: 20, message: '驾驶证号输入有误，请检查', trigger: 'blur' }],
        //   fieldName: 'drivingLicenseNumber',
        //   placeholder: ''
        // },

        {
          type: 'INPUT_NUMBER',
          label: '行驶里程',
          precision: 0,
          maxlength: 8,
          fieldName: 'mileage',
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '行驶证所有人',
          // rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          fieldName: 'vehiclePossessor',
          placeholder: '',
        },
        {
          type: 'TEXT_AREA',
          label: '备注',
          offsetRightCols: 1,
          maxlength: 600,
          fieldName: 'licenseRemark',
          placeholder: '',
          selfCols: 3,
        },
        {
          type: 'UPLOAD_FILE',
          label: '行驶证正面',
          fieldName: 'vehicleLicenseFrontList',
          selfCols: 2,
          // rules: [{ required: true, message: '请上传', trigger: 'blur' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            // fileTypes: ['jpg', 'png', 'bmp'],
            fileTypes: ['jpg'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '行驶证反面',
          selfCols: 2,
          fieldName: 'vehicleLicenseBackList',
          // rules: [{ required: true, message: '请上传', trigger: 'blur' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '驾驶证正面',
          selfCols: 2,
          fieldName: 'drivingLicenseFrontList',
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '驾驶证反面',
          selfCols: 2,
          fieldName: 'drivingLicenseBackList',
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '其他附件',
          fieldName: 'otherFileUrlList',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'xls', 'pdf', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
      ];
    },
    // ----------------------------其他信息--------------------------
    createdFrom4() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '其他信息',
        },
        {
          type: 'TEXT_AREA',
          label: '审批意见',
          fieldName: 'approvalComments',
          maxlength: 120,
          placeholder: '',
          rules: this.isExamine ? [{ required: true, message: '请输入审批意见', trigger: 'blur' }] : [],
          selfCols: 3,
        },
      ];
    },
    createdFrom5() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '电池租赁',
        },
        {
          type: 'INPUT',
          label: '协议签订',
          disabled: true,
          fieldName: 'statusName',
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '签订类型',
          disabled: true,
          fieldName: 'contractTypeName',
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '保证金缴纳',
          disabled: true,
          fieldName: 'depositOrderStatusName',
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '租金缴纳',
          disabled: true,
          fieldName: 'firstRentOrderStatusName',
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '月租金',
          disabled: true,
          fieldName: 'rentAmount',
          placeholder: '',
        },
        {
          type: 'INPUT',
          label: '保底里程',
          disabled: true,
          fieldName: 'rentType',
          placeholder: '',
        },
      ];
    },

  },
};
</script>
